package com.hbnu.service;

import com.hbnu.dao.GoodsDAO;
import com.hbnu.pojo.Goods;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class GoodServicelmpl implements GoodService{
    @Autowired
    private GoodsDAO goodsDAO;
    @Override
    public Goods getGoods(int id){
        return goodsDAO.getGoodsById(id);
    }
    @Override
    public List<Goods>getAllGoods(){
        return goodsDAO.findGoods();
    }
}
